<template>
  <div>
    <van-nav-bar title="活动" left-text="返回" left-arrow @click-left="handleToBack" fixed placeholder />
    <div>
      <van-cell-group>
        <van-cell
          class="u-text-left u-flex u-col-center"
          v-for="activity in activityList"
          :icon="activity.icon"
          :title="activity.title"
          :label="activity.label"
          :key="activity.key"
          :to="activity.url"
          is-link
        />
      </van-cell-group>
    </div>
  </div>
</template>
<script setup>
import { ref, computed } from "vue";
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const route = useRoute();
const accountId = computed(() => route.params.account_id)
const activityList = ref([
  {
    key: 0,
    title: "年报",
    label: "2021年我的刀塔总结",
    url: `/activity/year/${accountId.value}`,
    icon: "passed",
  },
  // {
  //   key: 1,
  //   title: "周报",
  //   label: "上周上了多少分?",
  //   url: `/activity/week/${accountId.value}`,
  //   icon: "close",
  // },
  {
    key: 2,
    title: "好友榜",
    label: "谁是上分好队友，谁是内鬼?",
    url: `/activity/friend/${accountId.value}`,
    icon: "passed",
  },
  // {
  //   key: 3,
  //   title: "英雄榜",
  //   label: "来看看我的最强英雄吧!",
  //   url: "/activity/hero",
  //   icon: "close",
  // },
  // {
  //   key: 4,
  //   title: "记录榜",
  //   label: "游戏各项之最",
  //   url: "/activity/record",
  //   icon: "close",
  // },
]);
const handleToBack = () => {
  router.back();
};
</script>
